<template>
	<view class="viewbox auto">
		<view class="list" v-for="(item,index) in pageData" :key="index" @click="Toanswer(item)">
			<image :src="$imgUrls(item.wx_img)" mode="aspectFill" class="list_top_img"></image>
			<view class="row f-column padding20-24">
				<view class="row a-center">
					<!-- xuanStudy -->
					<!-- <view class="tip flexac biStudy">
						<text class="tip_txt">必学</text>
						<text class="tip_txt">选学</text>
					</view> -->
					<text class="flex-1 size26 color_33 bold ellipsis">{{item.wx_title}}</text>
				</view>
				
				<view class="row j-sb a-center m-top10">
					<text class="color_66 h7">共{{item.total_count}}题，每日{{item.day_count}}题</text>
					<view class="d-flex a-center color_E6" v-if="item.rank">
						<text class="size26">第</text>
						<text class="size36 bold">{{item.rank}}</text>
						<text class="size26">名</text>
					</view>
				</view>
				
				
				<text class="color_66 h7 m-top10">共{{item.people_count}}人答题</text>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:'answerList',
		props:['pageData','all'],
		data() {
			return {
				
			}
		},
		methods: {
			Toanswer(item){
				if(!this.all) return;
				const gid = Object.keys(item.bankArr)[0];
				this.toUrl(`/answer/answerRank?act_id=${item.sid}&gid=${gid}`)
			},
		}
	}
</script>

<style lang="scss" scoped>
	.list{
		width:100%;
		background-color: #ffffff;
		box-shadow: 0 10rpx 20rpx #e6e6e6;
		border-radius: 10rpx;
		overflow: hidden;
		margin-bottom: 30rpx;
	}
	.list_top_img{
		width:100%;
		height: 200rpx;
	}
	.tip{
		border-radius: 8rpx;
		padding:2rpx 4rpx;
		margin-right: 10rpx;
	}
	.tip_txt{
		color:#ffffff;
		font-size:20rpx;
		zoom:0.9;
	}
	.biStudy{
		background-color: #FFB346;
	}
	.xuanStudy{
		background-color: #43A0FF;
	}
</style>
